package com.lst.tools.basics.utils;

import java.util.regex.Matcher;
import java.util.regex.Pattern;

/**
 * 正则验证工具类
 *
 * @author: Frank
 * @date: 2019/09/24 13:51
 * @version: V1.0
 */
public class RegexUtils {

    public static boolean match(String regex, String str) {
        Pattern pattern = Pattern.compile(regex);
        Matcher matcher = pattern.matcher(str);
        return matcher.matches();
    }
}
